import { request } from "../utils/request";

export const caeateOrder = (data) => {
  return request.post("/order", data);
};

export const getOrder = (orderNo) => {
  return request.get(`/order/${orderNo}`);
};

export const getOrderList = (params) => {
  return request.get("/order", {
    params,
  });
};
export const pay = (data) => {
  return request.post(`/order/pay`, data);
};

export const cancelOrder = (orderNo) => {
  return request.post("/order/cancelOrder", {
    orderNo,
  });
};

export const refundOrder = (data) => {
  return request.post("/order/applyRefund", data);
};
